<b>What is CSVTest?</b><br><br>
CSVTest is a data generator that produces CSV (comma-separated values) data 
suitable for use in relational database and other applications. 
<br><br>
<b>Why would I want to generate data?</b><br><br>
Well, if you have to ask, maybe you don't. But generated data is useful in
many different circumstances - for example:
<ul>
<li>Creating realistic demonstrations of your application</li>
<li>Test-driven design</li>
<li>Performance testing</li>
<li>Database sizing exercises</li>
</ul>
<b>What kind of data can CSVTest generate?</b><br><br>
Many different kinds. Out of the box it supports:
<ul>
<li>Random and non-random integers, reals, dates and times.</li>
<li>Random selection from CSV data files</li>
<li>Random strings</li>
<li>Foreign key and many-to-many relationships</li>
<li>Numeric, date and time ranges</li>
</ul>
All of the above can be composed to create new data types.
<br><br>
<b>What output formats does CSVTest support?</b><br><br>
Only CSV - hence the name. You can use its sister program CSVfix to 
produce different formats, such as SQL INSERT statements.
<br><br>
<b>What license does CSVTest use?</b><br><br>
The MIT License. Basically, you can do anything you want with the 
software and the code.
<br><br>
<b>How do I use it?</b><br><br>
You write a script using XML, and run it through the CSVTest executable. 
Here's a script called dice.xml that simulates rolling a 6-sided dice.
<br>

<pre>
<csvt>
  <gen>
     <rand_int begin="1" end="6" />
  </gen>
</csvt>
</pre>

You run the script like this:
<br><br>
<pre>
csvtest dice.xml
</pre>
which might produce the exciting output:
<pre>3</pre>
<b>That is deeply unimpressive - I can do that in Perl, Python etc.</b>
<br><br>
True enough. Most simple uses of CSVTest can be done as easily, or in some cases
more easily, with scripting languages. CSVTest begins to win out when things get a 
bit more complex, however. This script generates 52 CSV records representing 
four hands in a game of Bridge:
<pre>
&lt;csvt>
  &lt;gen>
    &lt;shuffle>
      &lt;product random="no"> 
         &lt;rows values="C,D,H,S" random="no"/>
         &lt;rows values="2,3,4,5,6,7,8,9,10,J,Q,K,A" random="no"/> 
      &lt;/product>    
    &lt;/shuffle>
  &lt;/gen>
&lt;/csvt
</pre>





 


